//
const express = require('express');
const {resolve} = require('path');

//
const app = express();

//使用内置的静态资源中间件      响应静态资源
app.use(express.static(resolve(__dirname, './public')));// __dirname + '/public'

//路由规则          响应动态资源
app.get('/home.html', (req, res) => {
  res.send('home home home');
});

//
app.listen(80, () => {
  console.log('oK');
})
